home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 92 / CDMM92_1.ISO / SOF 2 SDK / sof2sdk-101.msi / _92D6AC311BB48EBA344BBABC89DA6AB0 / _4299B6BA475F4F98A892296C15DD780E < prev    next >
Encoding:
Text File  |  2002-06-05  |  18.6 KB  |  499 lines

  1. // Copyright (C) 2001-2002 Raven Software.
  2. //
  3. // ui_shared.h --
  4.  
  5. #ifndef __UI_SHARED_H
  6. #define __UI_SHARED_H
  7.  
  8.  
  9. #include "../game/q_shared.h"
  10. #include "../cgame/tr_types.h"
  11. #include "keycodes.h"
  12.  
  13. #include "../../ui/menudef.h"
  14.  
  15. #define MAX_MENUNAME                32
  16. #define MAX_ITEMTEXT                64
  17. #define MAX_ITEMACTION                64
  18. #define MAX_MENUDEFFILE                4096
  19. #define MAX_MENUFILE                32768
  20. #define MAX_MENUS                    64
  21. #define MAX_MENUITEMS                128
  22. #define MAX_COLOR_RANGES            10
  23. #define MAX_OPEN_MENUS                16
  24. #define    MAX_TEXTSCROLL_LINES        256
  25.  
  26. #define WINDOW_MOUSEOVER            0x00000001    // mouse is over it, non exclusive
  27. #define WINDOW_HASFOCUS                0x00000002    // has cursor focus, exclusive
  28. #define WINDOW_VISIBLE                0x00000004    // is visible
  29. #define WINDOW_INACTIVE                0x00000008    // is visible but grey ( non-active )
  30. #define WINDOW_DECORATION            0x00000010    // for decoration only, no mouse, keyboard, etc.. 
  31. #define WINDOW_FADINGOUT            0x00000020    // fading out, non-active
  32. #define WINDOW_FADINGIN                0x00000040    // fading in
  33. #define WINDOW_MOUSEOVERTEXT        0x00000080    // mouse is over it, non exclusive
  34. #define WINDOW_INTRANSITION            0x00000100    // window is in transition
  35. #define WINDOW_FORECOLORSET            0x00000200    // forecolor was explicitly set ( used to color alpha images or not )
  36. #define WINDOW_HORIZONTAL            0x00000400    // for list boxes and sliders, vertical is default this is set of horizontal
  37. #define WINDOW_LB_LEFTARROW            0x00000800    // mouse is over left/up arrow
  38. #define WINDOW_LB_RIGHTARROW        0x00001000    // mouse is over right/down arrow
  39. #define WINDOW_LB_THUMB                0x00002000    // mouse is over thumb
  40. #define WINDOW_LB_PGUP                0x00004000    // mouse is over page up
  41. #define WINDOW_LB_PGDN                0x00008000    // mouse is over page down
  42. #define WINDOW_ORBITING                0x00010000    // item is in orbit
  43. #define WINDOW_OOB_CLICK            0x00020000    // close on out of bounds click
  44. #define WINDOW_WRAPPED                0x00040000    // manually wrap text
  45. #define WINDOW_AUTOWRAPPED            0x00080000    // auto wrap text
  46. #define WINDOW_FORCED                0x00100000    // forced open
  47. #define WINDOW_POPUP                0x00200000    // popup
  48. #define WINDOW_BACKCOLORSET            0x00400000    // backcolor was explicitly set 
  49. #define WINDOW_TIMEDVISIBLE            0x00800000    // visibility timing ( NOT implemented )
  50. #define WINDOW_DISABLED                0x01000000    // Disabled by ownerdrawdisabled
  51. #define WINDOW_DROPPED                0x02000000    // Dropped down (for combo boxes)
  52.  
  53.  
  54. // CGAME cursor type bits
  55. #define CURSOR_NONE                    0x00000001
  56. #define CURSOR_ARROW                0x00000002
  57. #define CURSOR_SIZER                0x00000004
  58.  
  59. #ifdef CGAME
  60. #define STRING_POOL_SIZE 128*1024
  61. #else
  62. #define STRING_POOL_SIZE 384*1024
  63. #endif
  64. #define MAX_STRING_HANDLES 4096
  65.  
  66. #define MAX_SCRIPT_ARGS 12
  67. #define MAX_EDITFIELD 256
  68.  
  69. #define ART_FX_BLUE            "menu/art/fx_blue"
  70. #define ART_FX_CYAN            "menu/art/fx_cyan"
  71. #define ART_FX_GREEN        "menu/art/fx_grn"
  72. #define ART_FX_RED            "menu/art/fx_red"
  73. #define ART_FX_TEAL            "menu/art/fx_teal"
  74. #define ART_FX_WHITE        "menu/art/fx_white"
  75. #define ART_FX_YELLOW        "menu/art/fx_yel"
  76.  
  77. #define ASSET_SCROLLBAR             "gfx/menus/scrollbar/scrollbar.tga"
  78. #define ASSET_SCROLLBAR_HORIZ        "gfx/menus/scrollbar/scrollbar_horiz.tga"
  79. #define ASSET_SCROLLBAR_ARROWDOWN   "gfx/menus/scrollbar/scrollbar_arrow_down.tga"
  80. #define ASSET_SCROLLBAR_ARROWUP     "gfx/menus/scrollbar/scrollbar_arrow_up.tga"
  81. #define ASSET_SCROLLBAR_ARROWLEFT   "gfx/menus/scrollbar/scrollbar_arrow_left.tga"
  82. #define ASSET_SCROLLBAR_ARROWRIGHT  "gfx/menus/scrollbar/scrollbar_arrow_right.tga"
  83. #define ASSET_SCROLL_THUMB          "gfx/menus/scrollbar/scrollbar_thumb.tga"
  84. #define ASSET_SLIDER_BAR            "gfx/menus/misc/bar"
  85. #define ASSET_SLIDER_THUMB            "gfx/menus/misc/button"
  86. #define SCROLLBAR_SIZE                18.0
  87. #define SLIDER_WIDTH                128.0
  88. #define SLIDER_HEIGHT                32.0
  89. #define SLIDER_THUMB_WIDTH            16.0
  90. #define SLIDER_THUMB_HEIGHT            32.0
  91. #define    NUM_CROSSHAIRS                5
  92.  
  93. typedef struct {
  94.   const char *command;
  95.   const char *args[MAX_SCRIPT_ARGS];
  96. } scriptDef_t;
  97.  
  98.  
  99. typedef struct {
  100.   float x;    // horiz position
  101.   float y;    // vert position
  102.   float w;    // width
  103.   float h;    // height;
  104. } rectDef_t;
  105.  
  106. typedef rectDef_t Rectangle;
  107.  
  108. // FIXME: do something to separate text vs window stuff
  109. typedef struct 
  110. {
  111.     Rectangle    rect;                 // client coord rectangle
  112.     Rectangle    rectClient;           // screen coord rectangle
  113.     const char    *name;               //
  114.     const char    *group;              // if it belongs to a group
  115.     const char    *cinematicName;          // cinematic name
  116.     int            cinematic;                                  // cinematic handle
  117.     int            style;                      //
  118.     int            border;                     //
  119.     int            ownerDraw;                                    // ownerDraw style
  120.     int            ownerWidth;
  121.     int            ownerDrawFlags;          // show flags for ownerdraw items
  122.     const char* ownerDrawParam;
  123.     float        borderSize;           // 
  124.     int            flags;                // visible, focus, mouseover, cursor
  125.     Rectangle    rectEffects;          // for various effects
  126.     Rectangle    rectEffects2;         // for various effects
  127.     int            offsetTime;           // time based value for various effects
  128.     int            nextTime;             // time next effect should cycle
  129.     vec4_t        foreColor;            // text color
  130.     vec4_t        backColor;            // border color
  131.     vec4_t        borderColor;          // border color
  132.     vec4_t        outlineColor;         // border color
  133.     qhandle_t    background;           // background asset  
  134.  
  135. } windowDef_t;
  136.  
  137. typedef windowDef_t Window;
  138.  
  139. typedef struct {
  140.     vec4_t    color;
  141.     float        low;
  142.     float        high;
  143. } colorRangeDef_t;
  144.  
  145. // FIXME: combine flags into bitfields to save space
  146. // FIXME: consolidate all of the common stuff in one structure for menus and items
  147. // THINKABOUTME: is there any compelling reason not to have items contain items
  148. // and do away with a menu per say.. major issue is not being able to dynamically allocate 
  149. // and destroy stuff.. Another point to consider is adding an alloc free call for vm's and have 
  150. // the engine just allocate the pool for it based on a cvar
  151. // many of the vars are re-used for different item types, as such they are not always named appropriately
  152. // the benefits of c++ in DOOM will greatly help crap like this
  153. // FIXME: need to put a type ptr that points to specific type info per type
  154. // 
  155. #define MAX_LB_COLUMNS 16
  156.  
  157. typedef struct columnInfo_s {
  158.     int pos;
  159.     int width;
  160.     int maxChars;
  161. } columnInfo_t;
  162.  
  163. typedef struct listBoxDef_s 
  164. {
  165.     int                startPos;
  166.     int                endPos;
  167.     int                drawPadding;
  168.     int                cursorPos;
  169.     float            elementWidth;
  170.     float            elementHeight;
  171.     int                elementStyle;
  172.     int                numColumns;
  173.     columnInfo_t    columnInfo[MAX_LB_COLUMNS];
  174.     const char*        doubleClick;
  175.     qboolean        notselectable;
  176.  
  177.     rectDef_t        comboRect;
  178.     rectDef_t        listRect;
  179.  
  180. } listBoxDef_t;
  181.  
  182. typedef struct comboBoxDef_s
  183. {
  184.     int                startPos;
  185.     int                endPos;
  186.     int                drawPadding;
  187.     int                cursorPos;
  188.     float            elementWidth;
  189.     float            elementHeight;
  190.  
  191. } comboBoxDef_t;
  192.  
  193. typedef struct editFieldDef_s {
  194.   float minVal;                  //    edit field limits
  195.   float maxVal;                  //
  196.   float defVal;                  //
  197.     float range;                                     // 
  198.   int maxChars;                  // for edit fields
  199.   int maxPaintChars;             // for edit fields
  200.     int paintOffset;                             // 
  201. } editFieldDef_t;
  202.  
  203. #define MAX_MULTI_CVARS 32
  204.  
  205. typedef struct multiDef_s {
  206.     const char *cvarList[MAX_MULTI_CVARS];
  207.     const char *cvarStr[MAX_MULTI_CVARS];
  208.     float cvarValue[MAX_MULTI_CVARS];
  209.     int count;
  210.     qboolean strDef;
  211. } multiDef_t;
  212.  
  213. typedef struct modelDef_s {
  214.     int angle;
  215.     vec3_t origin;
  216.     float fov_x;
  217.     float fov_y;
  218.     int rotationSpeed;
  219. } modelDef_t;
  220.  
  221. typedef struct textScrollDef_s 
  222. {
  223.     int                startPos;
  224.     int                endPos;
  225.  
  226.     float            lineHeight;
  227.     int                maxLineChars;
  228.     int                drawPadding;
  229.  
  230.     int                lineCount;
  231.     char*            lines[MAX_TEXTSCROLL_LINES];
  232.  
  233. } textScrollDef_t;
  234.  
  235. #define ITEM_ALIGN_LEFT        0        // left alignment
  236. #define ITEM_ALIGN_CENTER    1        // center alignment
  237. #define ITEM_ALIGN_RIGHT    2        // right alignment
  238.  
  239. #define CVAR_ENABLE        0x00000001
  240. #define CVAR_DISABLE    0x00000002
  241. #define CVAR_SHOW            0x00000004
  242. #define CVAR_HIDE            0x00000008
  243.  
  244. typedef struct itemDef_s {
  245.     Window        window;                        // common positional, border, style, layout info
  246.     Rectangle    textRect;                    // rectangle the text ( if any ) consumes     
  247.     int            type;                        // text, button, radiobutton, checkbox, textfield, listbox, combo
  248.     int            alignment;                    // left center right
  249.     int            textalignment;                // ( optional ) alignment for text within rect based on text width
  250.     float        textalignx;                    // ( optional ) text alignment x coord
  251.     float        textaligny;                    // ( optional ) text alignment x coord
  252.     float        textscale;                    // scale percentage from 72pts
  253.     int            textStyle;                    // ( optional ) style, normal and shadowed are it for now
  254.     qhandle_t    textFont;                    // Font to render text with
  255.     const char    *text;                        // display text
  256.     const char    *text2;                        // display text, 2nd line
  257.     float        text2alignx;                // ( optional ) text2 alignment x coord
  258.     float        text2aligny;                // ( optional ) text2 alignment y coord
  259.     void        *parent;                    // menu owner
  260.     qhandle_t    asset;                        // handle to asset
  261.     const char    *mouseEnterText;            // mouse enter script
  262.     const char    *mouseExitText;                // mouse exit script
  263.     const char    *mouseEnter;                // mouse enter script
  264.     const char    *mouseExit;                    // mouse exit script 
  265.     const char    *action;                    // select script
  266.     const char    *onFocus;                    // select script
  267.     const char    *leaveFocus;                // select script
  268.     const char    *cvar;                        // associated cvar 
  269.     const char    *cvarTest;                    // associated cvar for enable actions
  270.     const char    *enableCvar;                // enable, disable, show, or hide based on value, this can contain a list
  271.     int            cvarFlags;                    //    what type of action to take on cvarenables
  272.     sfxHandle_t focusSound;
  273.     int            numColors;                    // number of color ranges
  274.     colorRangeDef_t colorRanges[MAX_COLOR_RANGES];
  275.     float        special;                    // used for feeder id's etc.. diff per type
  276.     int            cursorPos;                    // cursor position in characters
  277.     void        *typeData;                    // type specific data ptr's    
  278.     const char    *descText;                    //    Description text
  279.     int            appearanceSlot;                // order of appearance
  280.     const char  *tooltip;                    // tooltip that pops up for this item
  281.     char        hotKey;                        // hotkey that activates button
  282. } itemDef_t;
  283.  
  284. typedef struct {
  285.     Window window;
  286.     const char  *font;                        // font
  287.     qboolean fullScreen;                    // covers entire screen 
  288.     int itemCount;                            // number of items;
  289.     int fontIndex;                            // 
  290.     int cursorItem;                            // which item as the cursor
  291.     int fadeCycle;                            //
  292.     float fadeClamp;                        //
  293.     float fadeAmount;                        //
  294.     const char *onOpen;                        // run when the menu is first opened
  295.     const char *onClose;                    // run when the menu is closed
  296.     const char *onESC;                        // run when the menu is closed
  297.     const char *soundName;                    // background loop sound for menu
  298.  
  299.     vec4_t focusColor;                        // focus color for items
  300.     vec4_t disableColor;                    // focus color for items
  301.     itemDef_t *items[MAX_MENUITEMS];        // items this menu contains   
  302.     int            descX;                        // X position of description
  303.     int            descY;                        // X position of description
  304.     vec4_t        descColor;                    // description text color for items
  305.     int            descAlignment;                // Description of alignment
  306.     float        appearanceTime;                //    when next item should appear
  307.     int            appearanceCnt;                //    current item displayed
  308.     float        appearanceIncrement;        //
  309.  
  310.     vec4_t        tooltipForeColor;            // foreground color for tooltips
  311.     vec4_t        tooltipBackColor;            // background color for tooltips
  312.     float        tooltipScale;                // scale of text for tooltips
  313.     int            tooltipDelay;
  314.     qhandle_t    tooltipFont;                // font to render tooltip text with
  315.  
  316. } menuDef_t;
  317.  
  318. typedef struct 
  319. {
  320.     const char    *fontStr;
  321.     const char    *cursorStr;
  322.     qhandle_t    defaultFont;
  323.     qhandle_t    cursor;
  324.     qhandle_t    scrollBarArrowUp;
  325.     qhandle_t    scrollBarArrowDown;
  326.     qhandle_t    scrollBarArrowLeft;
  327.     qhandle_t    scrollBarArrowRight;
  328.     qhandle_t    scrollBar;
  329.     qhandle_t    scrollBarHoriz;
  330.     qhandle_t    scrollBarThumb;
  331.     qhandle_t    buttonMiddle;
  332.     qhandle_t    buttonInside;
  333.     qhandle_t    solidBox;
  334.     qhandle_t    sliderBar;
  335.     qhandle_t    sliderThumb;
  336.     sfxHandle_t itemFocusSound;
  337.     float        fadeClamp;
  338.     int            fadeCycle;
  339.     float        fadeAmount;
  340.     float        shadowX;
  341.     float        shadowY;
  342.     vec4_t        shadowColor;
  343.     float        shadowFadeClamp;
  344.     qboolean    fontRegistered;
  345.  
  346.      // player settings
  347.     qhandle_t    crosshairShader[NUM_CROSSHAIRS];
  348.  
  349. } cachedAssets_t;
  350.  
  351. typedef struct 
  352. {
  353.     const char *name;
  354.     void (*handler) (itemDef_t *item, const char** args);
  355.  
  356. } commandDef_t;
  357.  
  358. typedef struct 
  359. {
  360.     qhandle_t (*registerShaderNoMip) (const char *p);
  361.     void (*setColor) (const vec4_t v);
  362.     void (*drawHandlePic) (float x, float y, float w, float h, qhandle_t asset);
  363.     void (*drawStretchPic) (float x, float y, float w, float h, float s1, float t1, float s2, float t2, const float* color, qhandle_t hShader );
  364.     void (*drawText) (float x, float y, qhandle_t font, float scale, vec4_t color, const char *text, int limit, int flags );
  365.     void (*drawTextWithCursor) (float x, float y, qhandle_t font, float scale, vec4_t color, const char *text, int limit, int flags, int cursorPos, char cursor );
  366.     int (*getTextWidth) (const char *text, qhandle_t font, float scale, int limit );
  367.     int (*getTextHeight) (const char *text, qhandle_t font, float scale, int limit );
  368.     qhandle_t (*registerModel) (const char *p);
  369.     void (*modelBounds) (qhandle_t model, vec3_t min, vec3_t max);
  370.     void (*fillRect) ( float x, float y, float w, float h, const vec4_t color);
  371.     void (*drawRect) ( float x, float y, float w, float h, float size, const vec4_t color);
  372.     void (*drawSides) (float x, float y, float w, float h, float size);
  373.     void (*drawTopBottom) (float x, float y, float w, float h, float size);
  374.     void (*clearScene) ();
  375.     void (*clearDecals) ();
  376.     void (*addRefEntityToScene) (const refEntity_t *re );
  377.     void (*renderScene) ( const refdef_t *fd );
  378.     qhandle_t (*registerFont) (const char *pFontname );
  379.     void (*ownerDrawItem) (float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, float special, qhandle_t font, float scale, vec4_t color, qhandle_t shader, int textStyle, const char* param );
  380.     float (*getValue) (int ownerDraw);
  381.     qboolean (*ownerDrawVisible) (int flags, const char* param );
  382.     qboolean (*ownerDrawDisabled) ( int flags, const char* param );
  383.     void (*runScript)(const char **p);
  384.     void (*getTeamColor)(vec4_t *color);
  385.     void (*getCVarString)(const char *cvar, char *buffer, int bufsize);
  386.     float (*getCVarValue)(const char *cvar);
  387.     void (*setCVar)(const char *cvar, const char *value);
  388.     void (*setOverstrikeMode)(qboolean b);
  389.     qboolean (*getOverstrikeMode)();
  390.     void (*startLocalSound)( sfxHandle_t sfx, int channelNum );
  391.     qboolean (*ownerDrawHandleKey)(int ownerDraw, int flags, float *special, int key, const char* param );
  392.     int (*feederCount)(float feederID);
  393.     const char *(*feederItemText)(float feederID, int index, int column, qhandle_t *handle);
  394.     qhandle_t (*feederItemImage)(float feederID, int index);
  395.     void (*feederSelection)(float feederID, int index);
  396.     void (*keynumToStringBuf)( int keynum, char *buf, int buflen );
  397.     void (*getBindingBuf)( int keynum, char *buf, int buflen );
  398.     void (*setBinding)( int keynum, const char *binding );
  399.     void (*executeText)(int exec_when, const char *text );    
  400.     void (*Error)(int level, const char *error, ...);
  401.     void (*Print)(const char *msg, ...);
  402.     void (*Pause)(qboolean b);
  403.     int (*ownerDrawWidth)(int ownerDraw, qhandle_t font, float scale );
  404.     sfxHandle_t (*registerSound)(const char *name);
  405.     void (*startBackgroundTrack)( const char *intro, const char *loop, qboolean bReturnWithoutStarting);
  406.     void (*stopBackgroundTrack)();
  407.     int (*playCinematic)(const char *name, float x, float y, float w, float h);
  408.     void (*stopCinematic)(int handle);
  409.     void (*drawCinematic)(int handle, float x, float y, float w, float h);
  410.     void (*runCinematicFrame)(int handle);
  411.  
  412.     float            yscale;
  413.     float            xscale;
  414.     float            bias;
  415.     int                realTime;
  416.     int                frameTime;
  417.     int                cursorx;
  418.     int                cursory;
  419.     int                tooltipx;
  420.     int                tooltipy;
  421.     int                tooltiptime;
  422.     itemDef_t        *tooltipItem;
  423.     qboolean        debug;
  424.  
  425.     cachedAssets_t    Assets;
  426.  
  427.     glconfig_t        glconfig;
  428.     qhandle_t        whiteShader;
  429.     qhandle_t        cursor;
  430.     float            FPS;
  431.  
  432. } displayContextDef_t;
  433.  
  434. const char *String_Alloc(const char *p);
  435. void String_Init();
  436. void String_Report();
  437. void Init_Display(displayContextDef_t *dc);
  438. void Display_ExpandMacros(char * buff);
  439. void Menu_Init(menuDef_t *menu);
  440. void Item_Init(itemDef_t *item);
  441. void Item_Action(itemDef_t *item);
  442. void Menu_PostParse(menuDef_t *menu);
  443. menuDef_t *Menu_GetFocused();
  444. itemDef_t* Menu_GetItemByName(menuDef_t* menu, const char* name );
  445. qboolean Menu_HandleKey(menuDef_t *menu, int key, qboolean down);
  446. void Menu_HandleMouseMove(menuDef_t *menu, float x, float y);
  447. void Menu_ScrollFeeder(menuDef_t *menu, int feeder, qboolean down);
  448. qboolean Float_Parse(const char **p, float *f);
  449. qboolean Color_Parse(const char **p, vec4_t *c);
  450. qboolean Int_Parse(const char **p, int *i);
  451. qboolean Rect_Parse(const char **p, rectDef_t *r);
  452. qboolean String_Parse(const char **p, const char **out);
  453. qboolean Script_Parse(const char **p, const char **out);
  454. qboolean PC_Float_Parse(int handle, float *f);
  455. qboolean PC_Color_Parse(int handle, vec4_t *c);
  456. qboolean PC_Int_Parse(int handle, int *i);
  457. qboolean PC_Rect_Parse(int handle, rectDef_t *r);
  458. qboolean PC_String_Parse(int handle, const char **out);
  459. qboolean PC_Script_Parse(int handle, const char **out);
  460. int Menu_Count();
  461. void Menu_New(int handle);
  462. void Menu_PaintAll();
  463. menuDef_t *Menus_ActivateByName(const char *p);
  464. void Menu_Reset();
  465. qboolean Menus_AnyFullScreenVisible();
  466. void  Menus_Activate(menuDef_t *menu);
  467.  
  468. displayContextDef_t *Display_GetContext();
  469. void *Display_CaptureItem(int x, int y);
  470. qboolean Display_MouseMove(void *p, int x, int y);
  471. int Display_CursorType(int x, int y);
  472. qboolean Display_KeyBindPending();
  473. void Menus_OpenByName(const char *p);
  474. menuDef_t *Menus_FindByName(const char *p);
  475. void Menus_ShowByName(const char *p);
  476. void Menus_CloseByName(const char *p);
  477. void Display_HandleKey(int key, qboolean down, int x, int y);
  478. void LerpColor(vec4_t a, vec4_t b, vec4_t c, float t);
  479. void Menus_CloseAll();
  480. void Menu_Paint(menuDef_t *menu, qboolean forcePaint);
  481. void Menu_SetFeederSelection(menuDef_t *menu, int feeder, int index, const char *name);
  482. void Display_CacheAll();
  483.  
  484. void Controls_GetConfig( void );
  485. void Controls_SetConfig(qboolean restart);
  486. void Controls_SetDefaults( void );
  487.  
  488. void        Tooltip_Paint ( itemDef_t *item );
  489.  
  490. int            trap_PC_AddGlobalDefine            ( char *define );
  491. int            trap_PC_LoadSource                ( const char *filename );
  492. int            trap_PC_FreeSource                ( int handle );
  493. int            trap_PC_ReadToken                ( int handle, pc_token_t *pc_token );
  494. int            trap_PC_SourceFileAndLine        ( int handle, char *filename, int *line );
  495. int            trap_PC_LoadGlobalDefines        ( const char* filename );
  496. void        trap_PC_RemoveAllGlobalDefines    ( void );
  497.  
  498. #endif
  499.